﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.Common;

namespace Sinacor.OMM.ConnectionManager.DataBase
{
    public interface IDataBase
    {
        bool Connected { get; }
        bool Connect();
        bool ExecuteNonQuery(string command);
        void Disconnect();
        void Close();
        int CompanyId { get; set; }
        IDataReader ExecuteReader(string command);
        object ExecuteScalar(string command);
        DbTransaction BeginTransaction();
        void RollBack();
        void Commit();
        bool ExecuteNonQuerySP(DbTransaction transaction, string storedProcedureName, params object[] parameterValues);
        bool ExecuteNonQuery(DbTransaction transaction, string command);
    }
}
